
package interface_grafica;

import javax.swing.JButton;
import javax.swing.JComboBox;
import javax.swing.JTable;
import javax.swing.JTextField;

import listeners.ListenersTelaConsultaSocio;
import listeners.ListenersTelaEdicaoDoacao;
import listeners.ListenersTelaRelatorioSocio;

public class TelaRelatorioSocio extends javax.swing.JPanel {

    private static TelaCadastroSocio instance;

    public static TelaCadastroSocio getInstance() {
        if (instance == null) {
            instance = new TelaCadastroSocio();
        }
        return instance;
    }     
    
    public TelaRelatorioSocio() {
        initComponents();
    }

    @SuppressWarnings("unchecked")
    // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
    private void initComponents() {

        opcaoSexo = new javax.swing.ButtonGroup();
        jLabel6 = new javax.swing.JLabel();
        tipoBuscaSocio = new javax.swing.JComboBox();
        campoBuscaSocio = new javax.swing.JTextField();
        botaoBuscaSocio = new javax.swing.JButton();
        jScrollPane1 = new javax.swing.JScrollPane();
        tabelaSocios = new javax.swing.JTable();
        jLabel7 = new javax.swing.JLabel();
        campoQuantSocios = new javax.swing.JTextField();
        jLabel8 = new javax.swing.JLabel();
        mesInicio = new javax.swing.JComboBox();
        mesFIm = new javax.swing.JComboBox();
        anoInicio = new javax.swing.JTextField();
        jLabel9 = new javax.swing.JLabel();
        anoFim = new javax.swing.JTextField();
        btCancelar = new javax.swing.JButton();
        jLabel1 = new javax.swing.JLabel();

        setPreferredSize(new java.awt.Dimension(1063, 557));

        jLabel6.setFont(new java.awt.Font("Segoe UI", 0, 12)); // NOI18N
        jLabel6.setText("Filtrar por");

        tipoBuscaSocio.setFont(new java.awt.Font("Segoe UI", 0, 12)); // NOI18N
        tipoBuscaSocio.setModel(new javax.swing.DefaultComboBoxModel(new String[] { "Sexo", "Idade", "Escolaridade" }));

        campoBuscaSocio.setFont(new java.awt.Font("Segoe UI", 0, 12)); // NOI18N

        botaoBuscaSocio.setFont(new java.awt.Font("Segoe UI", 0, 12)); // NOI18N
        botaoBuscaSocio.setText("Pesquisar");
        botaoBuscaSocio.addActionListener(new ListenersTelaRelatorioSocio());

        tabelaSocios.setFont(new java.awt.Font("Segoe UI", 0, 12)); // NOI18N
        tabelaSocios.setModel(new javax.swing.table.DefaultTableModel(
            new Object [][] {
                {null, null, null, null}
            },
            new String [] {
                "ID", "Nome", "Data de cadastro", "Quantidade de moradores por sociedade"
            }
        ) {
            Class[] types = new Class [] {
                java.lang.Integer.class, java.lang.String.class, java.lang.String.class, java.lang.Integer.class
            };
            boolean[] canEdit = new boolean [] {
                false, false, false, false
            };

            public Class getColumnClass(int columnIndex) {
                return types [columnIndex];
            }

            public boolean isCellEditable(int rowIndex, int columnIndex) {
                return canEdit [columnIndex];
            }
        });
        jScrollPane1.setViewportView(tabelaSocios);

        jLabel7.setFont(new java.awt.Font("Segoe UI", 0, 12)); // NOI18N
        jLabel7.setText("Quantidade de membros cadastrados:");

        campoQuantSocios.setFont(new java.awt.Font("Segoe UI", 0, 12)); // NOI18N

        jLabel8.setFont(new java.awt.Font("Segoe UI", 0, 12)); // NOI18N
        jLabel8.setText("Periodo:");

        mesInicio.setFont(new java.awt.Font("Segoe UI", 0, 12)); // NOI18N
        mesInicio.setModel(new javax.swing.DefaultComboBoxModel(new String[] { "Janeiro", "Fevereiro", "Marco", "Abril", "Maio", "Junho", "Julho", "Agosto", "Setembro", "Outubro", "Novembro", "Dezembro" }));

        mesFIm.setFont(new java.awt.Font("Segoe UI", 0, 12)); // NOI18N
        mesFIm.setModel(new javax.swing.DefaultComboBoxModel(new String[] { "Janeiro", "Fevereiro", "Marco", "Abril", "Maio", "Junho", "Julho", "Agosto", "Setembro", "Outubro", "Novembro", "Dezembro" }));

        anoInicio.setFont(new java.awt.Font("Segoe UI", 0, 12)); // NOI18N
        anoInicio.setText("ano");

        jLabel9.setFont(new java.awt.Font("Segoe UI", 0, 12)); // NOI18N
        jLabel9.setText("a");

        anoFim.setFont(new java.awt.Font("Segoe UI", 0, 12)); // NOI18N
        anoFim.setText("ano");

        btCancelar.setText("Cancelar");
        btCancelar.addActionListener(new ListenersTelaRelatorioSocio());
        
        jLabel1.setFont(new java.awt.Font("Tahoma", 1, 18)); // NOI18N
        jLabel1.setText("Relatorio de Socios");

        javax.swing.GroupLayout layout = new javax.swing.GroupLayout(this);
        this.setLayout(layout);
        layout.setHorizontalGroup(
            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(layout.createSequentialGroup()
                .addGap(61, 61, 61)
                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(layout.createSequentialGroup()
                        .addComponent(campoQuantSocios, javax.swing.GroupLayout.PREFERRED_SIZE, 67, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                        .addComponent(btCancelar)
                        .addGap(82, 82, 82))
                    .addGroup(layout.createSequentialGroup()
                        .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addGroup(layout.createSequentialGroup()
                                .addComponent(jLabel6)
                                .addGap(59, 59, 59)
                                .addComponent(jLabel8))
                            .addComponent(jLabel7)
                            .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING, false)
                                .addGroup(layout.createSequentialGroup()
                                    .addComponent(tipoBuscaSocio, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                                    .addGap(18, 18, 18)
                                    .addComponent(mesInicio, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                                    .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                                    .addComponent(anoInicio, javax.swing.GroupLayout.PREFERRED_SIZE, 42, javax.swing.GroupLayout.PREFERRED_SIZE)
                                    .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                                    .addComponent(jLabel9)
                                    .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                                    .addComponent(mesFIm, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                                    .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                                    .addComponent(anoFim, javax.swing.GroupLayout.PREFERRED_SIZE, 42, javax.swing.GroupLayout.PREFERRED_SIZE)
                                    .addGap(18, 18, 18)
                                    .addComponent(campoBuscaSocio)
                                    .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                                    .addComponent(botaoBuscaSocio))
                                .addComponent(jScrollPane1, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.PREFERRED_SIZE, 837, javax.swing.GroupLayout.PREFERRED_SIZE)))
                        .addContainerGap(165, Short.MAX_VALUE))))
            .addGroup(layout.createSequentialGroup()
                .addGap(438, 438, 438)
                .addComponent(jLabel1)
                .addGap(0, 0, Short.MAX_VALUE))
        );
        layout.setVerticalGroup(
            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(layout.createSequentialGroup()
                .addGap(30, 30, 30)
                .addComponent(jLabel1)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 92, Short.MAX_VALUE)
                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jLabel6)
                    .addComponent(jLabel8))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(tipoBuscaSocio, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(campoBuscaSocio, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(mesInicio, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(anoInicio, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(jLabel9)
                    .addComponent(mesFIm, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(anoFim, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(botaoBuscaSocio))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(jScrollPane1, javax.swing.GroupLayout.PREFERRED_SIZE, 271, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                .addComponent(jLabel7)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(campoQuantSocios, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(btCancelar))
                .addGap(32, 32, 32))
        );
    }// </editor-fold>//GEN-END:initComponents

    // Variables declaration - do not modify//GEN-BEGIN:variables
    private javax.swing.JTextField anoFim;
    private javax.swing.JTextField anoInicio;
    private javax.swing.JButton botaoBuscaSocio;
    private javax.swing.JButton btCancelar;
    private javax.swing.JTextField campoBuscaSocio;
    private javax.swing.JTextField campoQuantSocios;
    private javax.swing.JLabel jLabel1;
    private javax.swing.JLabel jLabel6;
    private javax.swing.JLabel jLabel7;
    private javax.swing.JLabel jLabel8;
    private javax.swing.JLabel jLabel9;
    private javax.swing.JScrollPane jScrollPane1;
    private javax.swing.JComboBox mesFIm;
    private javax.swing.JComboBox mesInicio;
    private javax.swing.ButtonGroup opcaoSexo;
    private javax.swing.JTable tabelaSocios;
    private javax.swing.JComboBox tipoBuscaSocio;
    // End of variables declaration//GEN-END:variables

    public JTextField getAnoFim() {
        return anoFim;
    }

    public JTextField getAnoInicio() {
        return anoInicio;
    }

    public JButton getBotaoBuscaSocio() {
        return botaoBuscaSocio;
    }

    public JButton getBtCancelar() {
        return btCancelar;
    }

    public JTextField getCampoBuscaSocio() {
        return campoBuscaSocio;
    }

    public JTextField getCampoQuantSocios() {
        return campoQuantSocios;
    }

    public JComboBox getMesFIm() {
        return mesFIm;
    }

    public JComboBox getMesInicio() {
        return mesInicio;
    }

    public JTable getTabelaSocios() {
        return tabelaSocios;
    }

    public JComboBox getTipoBuscaSocio() {
        return tipoBuscaSocio;
    }
}
